package com.lostandfound.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lostandfound.dao.TopicDao;
import com.lostandfound.entity.Topic;
import com.lostandfound.service.TopicService;

/**  
* 
*  
* @date 2018年3月11日
*/
@Service("topicService")
@Transactional
public class TopicServiceImpl implements TopicService {
	
	@Autowired
	private TopicDao topicDao;

	@Override
	public Serializable save(Topic topic) {
		return topicDao.save(topic);
	}

	@Override
	public void update(Topic topic) {
		topicDao.update(topic);
	}

	@Override
	public void delete(Topic topic) {
		topicDao.delete(topic);
	}

	@Override
	public Topic selectByPrimary(Long id) {
		return topicDao.selectByPrimary(id);
	}

	@SuppressWarnings("rawtypes")
	@Override
	public List listTopicByPage(Map<String, Object> pagemap) {
		return topicDao.listTopicByPage(pagemap);
	}

	@Override
	public int Count(Map<String, Object> pagemap) {
		return topicDao.Count(pagemap);
	}

	@Override
	public void deleteTopicByBranch(Long[] topics) {
		topicDao.deleteTopicByBranch(topics);
	}

	@Override
	public void deleteTopicByUser(Long uid) {
		topicDao.deleteTopicByUser(uid);
	}

	@Override
	public void deleteTopicByPlate(Long pid) {
		topicDao.deleteTopicByPlate(pid);
	}

}
